import Layout from '@/layout'

const commodityRouter = {
    path: '/commodity',
    component: Layout,
    redirect: '/commodity/commoditycategory',
    name: 'Commodity',
    meta: {
        title: 'commodity',
        icon: 'shopping',
        roles: ['other'] // you can set roles in root nav
    },
    children: [
        {
            path: 'commoditycategory',
            component: () => import('@/views/commodity/commodityCategory'),
            name: 'CommodityCategory',
            meta: {
                title: 'commoditycategory',
                roles: ['other'] // or you can only set roles in sub nav
            }
        },
        {
            path: 'commoditymanage',
            component: () => import('@/views/commodity/commodityManage'),
            name: 'CommodityManage',
            meta: {
                title: 'commoditymanage',
                roles: ['other'] // or you can only set roles in sub nav
            }
        },
        {
            path: 'commoditymanageedite',
            component: () => import('@/views/commodity/commodityManageEdite'),
            name: 'CommodityManageEdite',
            hidden: true,
            meta: {
                title: 'commoditymanageedite',
                roles: ['other'] // or you can only set roles in sub nav
            }
        },
        {
            path: 'commodityorder',
            component: () => import('@/views/commodity/commodityOrder'),
            name: 'CommodityOrder',
            meta: {
                title: 'commodityorder',
                roles: ['other'] // or you can only set roles in sub nav
            }
        },
        {
            path: 'commodityorderdetail',
            component: () => import('@/views/commodity/commodityOrderDetail'),
            name: 'CommodityOrderDetail',
            hidden:true,
            meta: {
                title: 'commodityorderdetail',
                roles: ['other'] // or you can only set roles in sub nav
            }
        },
    ]
}
export default commodityRouter